package com.night.administration.feign;

import com.night.common.entity.ResultVo;
import com.night.common.entity.student.Score;
import com.night.common.entity.student.Student;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * @ClassName: StudentFeign
 * @Description: //TODO 微服务调用
 * @author: LZJ
 * @date: 2022/10/27-11:16
 * @version: v1.0
 */
@FeignClient(value = "student-lesson-score-evaluate") //提供者的名字
@RequestMapping("/api/v1/student")
public interface StudentFeign {
    //根据班级id查学生
    @GetMapping("/student/{classId}")
    ResultVo<List<Student>> getStudentByClassId(@PathVariable("classId") int classId);

    @PostMapping("/score/update")
    ResultVo addScore(@RequestBody Score score);
}